<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <div id="app">
        <!-- if和show的区别：if不满足的时候document节点不存在；show不满足时，通过样式隐藏 -->
        <button v-on:click="show = !show">点我呀</button>
        <h1 v-if="show">if=看到我。。。</h1>
        <h1 v-show="show">show=看到我</h1>
    </div>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                show: true


            }
        });
    </script>
</body>

</html>